<template>
  <div check-button>
    <div
      class="icon-select"
      :class="{ 'select-active': modelValue }"
      @click="selectBtn"
    >
      <img src="~assets/img/cart/tick.svg" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  name: "checkButton",
  props: {
    modelValue: {
      type: Boolean,
      default: true,
    },
  },
  methods: {
    selectBtn() {
      this.$emit("selectChange");
    },
  },
};
</script>

<style scoped>
.icon-select {
  position: relative;
  margin: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  cursor: pointer;
}
.select-active {
  background-color: #ff8198;
  border-color: #ff8198;
}
</style>